<div class="plan-detail">
    <div nz-form-item nz-row style="margin-top:15px;margin-bottom:10px;">
        <div nz-col [nzSpan]="6">
            <button nz-button [nzType]="'primary'" [nzSize]="'small'" col-offset-2 (click)="toBack()">
                <i class="anticon anticon-left"></i>
                <span>返回</span>
            </button>
        </div>
    </div>
  <nz-spin [nzTip]="'正在查询请等待...'" [nzSize]="'large'" [nzSpinning]="isSpinning">
    <nz-collapseset>
        <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
            <form nz-form [nzLayout]="'inline'">
                <div style="margin-bottom: 12px" nz-row>

                  <div nz-form-label nz-col [nzSpan]="2">
                    <label>检查人</label>
                  </div>
                  <div nz-form-control nz-col [nzSpan]="4">
                    <nz-select style="width: 150px;" nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="planDetail.checkState"
                               [nzShowSearch]="true" name="checkState">
                      <nz-option *ngFor="let option of checkManList" [nzLabel]="option" [nzValue]="option"></nz-option>
                    </nz-select>
                  </div>
                    <!--<div nz-form-label nz-col [nzSpan]="2">
                        <label>计划状态</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="4">
                        <nz-select style="width: 150px;" nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="planDetail.checkState"
                            [nzShowSearch]="true" name="checkState">
                            <nz-option *ngFor="let option of checkStateList" [nzLabel]="option.label" [nzValue]="option.value"></nz-option>
                        </nz-select>
                    </div>-->
                    <button nz-button nz-col [nzSpan]="2" [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
                </div>
            </form>
        </nz-collapse>
    </nz-collapseset>
    <ul nz-menu [nzMode]="'horizontal'">
        <li nz-menu-item (click)="add(title, content, footer)">
            <i class="anticon anticon-plus"></i>下达任务工单
        </li>

        <li nz-menu-item (click)="delete()">
            <i class="anticon anticon-delete"></i>删除
        </li>
        <!-- <li nz-menu-item>
            <i class="anticon anticon-copy"></i>导出
        </li> -->
    </ul>
    <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false"
        (nzDataChange)="displayDataChange($event)">
        <thead nz-thead>
            <tr>
                <th nz-th [nzCheckbox]="true">
                    <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
                    </label>
                </th>
                <th nz-th>
                    <span>实施对象</span>
                </th>
                <th nz-th>
                    <span>责任人</span>
                </th>
                <th nz-th>
                    <span>检查人员</span>
                </th>
                <!--<th nz-th>
                    <span>计划状态</span>
                </th>-->
                <th nz-th>
                    <span>检查记录</span>
                </th>
                <th nz-th>
                  <span>发送通知</span>
                </th>
                <!--<th nz-th>
                    <span>导出</span>
                </th>-->
            </tr>
        </thead>
        <tbody nz-tbody>
            <tr nz-tbody-tr *ngFor="let data of list">
                <td nz-td [nzCheckbox]="true">
                    <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
                    </label>
                </td>
                <td nz-td>{{data.implementObject}}</td>
                <td nz-td >{{data.headMan}}</td>
                <td nz-td >{{data.checkMan}}</td>
                <!--<td nz-td>{{data.planStatus}}</td>-->
                <td nz-td>{{data.checkRecord | constantTransfer:checkStateList }}</td>
                <td nz-td><button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="sendMessage()">发送通知</button></td>
               <!-- <td nz-td><button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="exportExcelObj(data)" >导出</button></td>-->
            </tr>
        </tbody>
    </nz-table>

    <nz-pagination [nzPageIndex]="objectPlan.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger
        (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)"
        (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="objectPlan.pageSize"></nz-pagination>


    <ng-template #title>
        <span>{{modelTitle}}</span>
    </ng-template>
    <ng-template #content>
      <spot-object-modify *ngIf="modal==0" [inValue]="this" (outPut)="addOutPut($event)"></spot-object-modify>
    </ng-template>
    <ng-template #footer>
        <div>
        </div>
    </ng-template>
  </nz-spin>
</div>
